using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace KbsUmlEditor
{
    public partial class FormNotitiEdit : Form
    {
        private string  m_Notitie;

        public string  Notitie
        {
            get { return m_Notitie; }
            set { m_Notitie = value; }
        }

        Point m_Begin;

        public Point Begin
        {
            get { return m_Begin; }
            set { m_Begin = value; }
        }

        Point m_Eind;

        public Point Eind
        {
            get { return m_Eind; }
            set { m_Eind = value; }
        }
	

        public FormNotitiEdit()
        {
            InitializeComponent();
            button1.DialogResult = DialogResult.OK;
            button2.DialogResult = DialogResult.Cancel;


            textBoxBeginX.Text = m_Begin.X.ToString();
            textBoxBeginY.Text = m_Begin.Y.ToString();
            textBoxEindX.Text = m_Eind.X.ToString();
            textBoxEindY.Text = m_Eind.Y.ToString();

            textBox1.Text = m_Notitie;
            
           
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {//ok
            try
            {
                m_Notitie = textBox1.Text;
                m_Begin.X = int.Parse(textBoxBeginX.Text);
                m_Begin.Y = int.Parse(textBoxBeginY.Text);
                m_Eind.X = int.Parse(textBoxEindX.Text);
                m_Eind.Y = int.Parse(textBoxEindY.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
           
        }

        private void button2_Click(object sender, EventArgs e)
        {//cancel
           
        }

        private void FormEdit_VisibleChanged(object sender, EventArgs e)
        {

            textBox1.Text = m_Notitie;
            textBoxBeginX.Text = m_Begin.X.ToString();
            textBoxBeginY.Text = m_Begin.Y.ToString();
            textBoxEindX.Text = m_Eind.X.ToString();
            textBoxEindY.Text = m_Eind.Y.ToString();
            
        }

        
    }
}